#ifndef QSCRIPTEDITDIALOG_H
#define QSCRIPTEDITDIALOG_H

#include <QDialog>
#include <QStatusBar>

class ScriptEditView;
class QActionToolBar;
class StyledBar;
class QProperty;
class QFindWidget;
class QScriptParamInfoWidget;
class QScriptObjectListWidget;

class QScriptEditDialog : public QDialog
{
    Q_OBJECT
public:
    QScriptEditDialog(QProperty* property,QWidget* parent=0);

protected:
    void    closeEvent(QCloseEvent *);
protected slots:
    void    dataChanged();
    void    save();
    void    showFindWidget();

    void    find(const QString &text);

    void    functionSelect(const QString &text,int count,const QString& type);
signals:
    void    save(const QString &script);
protected:
    ScriptEditView  *m_scripteView;
    StyledBar       *m_scripteViewBar;
    QActionToolBar  *m_toolBar;
    QScriptParamInfoWidget  *m_infoWidget;
    QScriptObjectListWidget *m_objectListView;
    QStatusBar      *m_statusBar;
    bool            m_modified;
    QProperty       *m_property;
    QString         m_title;
    QFindWidget     *m_findWidget;
};

#endif // QSCRIPTEDITDIALOG_H
